import {defHttp} from '/@/utils/http/axios';
import {PageParams} from "/@/api/model/baseModel";


enum Api {
  page = '/front/user/page',
  get = '/front/user/get',
  setUserStatus = '/front/user/setStatus',
  remove = '/front/user/remove'
}

export const userPage = (pageParams: PageParams) =>
  defHttp.get({url: Api.page, params: pageParams}, {errorMessageMode: 'none'});

export const setUserStatus = (userId: number) =>
  defHttp.post({url: Api.setUserStatus, params: {userId}});

export const getUserInfo = (userId: number) =>
  defHttp.get({url: Api.get, params: {userId}});
